<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Masterplate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-masterplate" class="form-control" name="row[masterplate]" type="text"
                   placeholder="微信小程序订阅消息模版id">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('通知类型')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-type" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                <option value="{$key|htmlentities}" {in name="key" value="" }selected{
                /in}>{$vo|htmlentities}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('详细内容')}:</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[multiplejson]" data-template="row[multiplejson]tpl"
                   id="second-table">
                <tr>
                    <td>{:__('字段名')}</td>
                    <td>{:__('微信关键词')}</td>
                    <td>{:__('介绍')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr>
                    <td colspan="3">
                        <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i>
                            {:__('Append')}</a>
                        <textarea name="row[multiplejson]" class="form-control hide" cols="30" rows="5"></textarea>
                    </td>
                </tr>
            </table>
            <script type="text/html" id="row[multiplejson]tpl">
                <tr>
                    <td><input id="c-title" type="text" name="<%=name%>[<%=index%>][title]"
                               class="form-control selectpage"
                               data-source='[{"id":1,"title":"商户名"},{"id":2,"title":"订单编号"},{"id":3,"title":"支付金额"},{"id":4,"title":"支付时间"},{"id":5,"title":"商品名称"},{"id":6,"title":"退款金额"},{"id":7,"title":"退款时间"},{"id":8,"title":"订单状态"},{"id":9,"title":"商家名称"},{"id":10,"title":"当前积分"},{"id":11,"title":"变更数量"},{"id":12,"title":"变更原因"},{"id":13,"title":"变更时间"},{"id":14,"title":"商家名称"},{"id":15,"title":"桌号"},{"id":16,"title":"订单状态"},{"id":17,"title":"加菜金额"}]'
                               data-order-by="id" data-field="title" value="<%=row.title%>"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][keyword]" class="form-control"
                               value="<%=row.keyword%>"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control"
                               value="<%=row.value%>"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
